package com.aruba.consumer.controller;

import com.aruba.bean.User;
import com.aruba.consumer.service.UserService;
import org.apache.zookeeper.KeeperException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.rmi.NotBoundException;
import java.util.List;

@RestController
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping("/getUserList")
    public List<User> getUserList() throws NotBoundException, IOException, InterruptedException, KeeperException {
        return userService.getUserList();
    }
}
